import { Controller, Body, Post } from '@nestjs/common'
import { UserService } from './user.service'
import { ApiTags, ApiOperation } from '@nestjs/swagger'
import { WxUser } from '@libs/db/schemas/user.schema'
import { RegUser } from './dto'
@Controller('user')
@ApiTags('用户')
export class UserController {
  constructor(private readonly userService: UserService) {}

  @Post('reg')
  @ApiOperation({ summary: '注册用户' })
  regUser(@Body() user: RegUser): Promise<WxUser> {
    return this.userService.regUser(user)
  }
}
